import function,shutil,os
import mysql.connector


mydb = mysql.connector.connect(
  host="192.168.10.81",
  user="root",
  passwd="",
  database="xiaocheng"
)
mycursor = mydb.cursor()
# query = ("update pattern set operate='待处理' where operate='处理完'")
# mycursor.execute(query)
# mydb.commit()
# print(mycursor.rowcount, " 条记录更新")

mycursor.execute("SELECT count(*) FROM pattern")
 
myresult = mycursor.fetchone()
 
print(myresult)